package com.zhangfei.plus.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class RestConfig {


    @LoadBalanced  //当使用自定义的负载均衡策略时候，需要把这个注解注释掉
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }


}
